package homework.singleton.coding;

public class EarthSingleton {
    private EarthSingleton(){ System.out.println("地球诞生");}
    private static  int temp=2;
    private static EarthSingleton earth=new EarthSingleton();
    public int getTemp(){
        return temp;
    }
    public void setTemp(int num){
        temp=num;
    }
    public static EarthSingleton getEarth() {

        return earth;
    }
}
